<!-- START of Symfony2 Web Debug Toolbar -->
{% if 'normal' != position %}
    <div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar">
        <a href="javascript:void(0);" title="Show Symfony toolbar" onclick="
            var elem = this.parentNode;
            if (elem.style.display == 'none') {
                document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'none';
                document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'none';
                elem.style.display = 'block';
            } else {
                document.getElementById('sfToolbarMainContent-{{ token }}').style.display = 'block';
                document.getElementById('sfToolbarClearer-{{ token }}').style.display = 'block';
                elem.style.display = 'none'
            }

            Sfjs.setPreference('toolbar/displayState', 'block');
        ">
            <img width="26" height="28" alt="Symfony" src=""/>
        </a>
    </div>
    <style type="text/css">
        {% include '@WebProfiler/Profiler/toolbar.css.twig' with { 'position': position, 'floatable': true } %}
    </style>
    <div id="sfToolbarClearer-{{ token }}" style="clear: both; height: 38px;"></div>
{% endif %}

<div id="sfToolbarMainContent-{{ token }}" class="sf-toolbarreset">
    {% for name, template in templates %}
        {{ template.renderblock('toolbar', {
            'collector': profile.getcollector(name),
            'profiler_url': profiler_url,
            'token': profile.token,
            'name': name
          })
        }}
    {% endfor %}

    {% if 'normal' != position %}
        <a class="hide-button" title="Close Toolbar" onclick="
            var p = this.parentNode;
            p.style.display = 'none';
            (p.previousElementSibling || p.previousSibling).style.display = 'none';
            document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block';
            Sfjs.setPreference('toolbar/displayState', 'none');
        "></a>
    {% endif %}
</div>
<!-- END of Symfony2 Web Debug Toolbar -->
